package com.ffapp.demo.bean;


import android.text.TextUtils;

import com.alibaba.fastjson.annotation.JSONField;

import java.io.Serializable;
import java.util.ArrayList;

public class ContactListData implements Serializable {

    /**
     *
     */
    private static final long serialVersionUID = 1L;

    /**
     * id : 35000461
     * title : 简湘祯(无信息)
     * parentId : 35110033
     * type : null
     * number : 0
     * deptName : null
     * fullPath : null
     * value : 35000461
     * key : 35000461
     * children : null
     * leaf : 1
     * layer : false
     * bizData : {"id":"35000461","name":"简湘祯","account":null,"phone":"13906022856","deptId":"35110033","deptName":"信通科","post":"无信息","unionId":null,"openId":null,"longitude":null,"latitude":null,"speed":null,"angle":null,"gpsTime":null,"userGroup":null}
     */

    private String id;
    private String title;
    private String parentId;
    private String type;
    private int number;
    private String deptName;
    private String fullPath;
    private String value;
    private String key;
    private ArrayList<ContactListData> children;
    private String leaf;
    private boolean layer;

    private ContactBizData bizData;

    @JSONField(serialize = false)
    private boolean isExpand = false;
    @JSONField(serialize = false)
    private int level = 0;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        if(TextUtils.isEmpty(title))return "";
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public String getDeptName() {
        if(TextUtils.isEmpty(deptName))return "";
        return deptName;
    }

    public void setDeptName(String deptName) {
        this.deptName = deptName;
    }

    public String getFullPath() {
        return fullPath;
    }

    public void setFullPath(String fullPath) {
        this.fullPath = fullPath;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public ArrayList<ContactListData> getChildren() {
        return children;
    }

    public void setChildren(ArrayList<ContactListData> children) {
        this.children = children;
    }

    public String getLeaf() {
        return leaf;
    }

    @JSONField(serialize = false)
    public boolean isLeaf_BOOLEAN(){
        return  leaf.equals("1");
    }

    public void setLeaf(String leaf) {
        this.leaf = leaf;
    }

    public boolean isLayer() {
        return layer;
    }

    public void setLayer(boolean layer) {
        this.layer = layer;
    }

    public ContactBizData getBizData() {
        return bizData;
    }

    public void setBizData(ContactBizData bizData) {
        this.bizData = bizData;
    }

    public boolean isExpand() {
        return isExpand;
    }

    public void setExpand(boolean expand) {
        isExpand = expand;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }
}
